<?php

class MsgModel extends RelationModel {

		protected $_link=array(

		'User'=>array(
		        'mapping_type'=> BELONGS_TO,
				'foreign_key'=>'author_id',
				'as_fields'=>'username,create_time,get,login_ip'

		),
        'Comm'=>array(
 		        'mapping_type'=> HAS_MANY,
				'foreign_key'=>'mes_id',
				'mapping_fields'=>'author,content,time,towho'

       )


	);

    function list_msg() {

    	   return $cate =M('Msg');
    }

}


?>